home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_313 / uucp / uucp1.lzh / man / UUSer < prev   
Text File  |  1989-10-23  |  1KB  |  53 lines

  1.  
  2.  
  3. NAME
  4.     UUser    (AmigaDOS Handler)
  5.  
  6. SYNOPSIS
  7.     Mount uuser:
  8.  
  9.     Open Format:    uuser:devicename/unit/options
  10.     Example:    uuser:serial.device/0/R1000
  11.  
  12. DESCRIPTION
  13.     Options:    Rn    Set read timeout when no data available (millisecs)
  14.             C0    Ignore carrier detect
  15.  
  16.     The UUSER: handler allows arbitrary programs to talk to any
  17.     serial.device and unit uses Read() and Write() calls.
  18.  
  19.     Consequently, stdio may be used as well.
  20.  
  21.     UUSER: IS NORMALLY SETUP BY GETTY WHEN IT RUNS A PROGRAM.  See
  22.     GETTY.MAN for more info.  Essentially, if a '*' appears before
  23.     the command-to-run in the passwd file Getty will setup UUSER:
  24.     on the stdin and stdout of the command it runs after a valid
  25.     login sequence.
  26.  
  27. DIFFERENCES FROM NORMAL HANDLERS:
  28.  
  29.     To avoid a gets() or getc() or read() or Read() (or whatever
  30.     call you use to read data from stdin), UUSER: times out after
  31.     1 second if no characters have been received.
  32.  
  33.     If you are using stdio, you get an EOF when this occurs.  You
  34.     can clear the EOF state by calling clrerr(stdin).
  35.  
  36.     UUSER: will return immediately when at least one character is
  37.     ready.    Thus, if you do:
  38.  
  39.         n = read(0, Buf, 256)
  40.  
  41.     n will return:
  42.  
  43.         -1    =   Lost Carrier
  44.         0    =   Timeout (loop retry?)
  45.      1-256    =   Anywhere from 1 to 256 bytes have been recevied
  46.  
  47.     UUSER: checks carrier and if it detects carrier is lost, will
  48.     return an error for both read and write calls.
  49.  
  50.     If using stdio for writing, be sure to call fflush(stdout) when
  51.     you want to flush stdio's buffer to the serial port.
  52.  
  53.